pvgrub: ignore NUL
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 6 Nov 2014 10:41:28 +0000 (10:41 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 10 Nov 2014 12:03:36 +0000 (12:03 +0000)
commite6fa63d6cf8e79de2cfb2d428269b6d6f698c3d2
tree6c9f07be5d02680d09b5b9c3ef949a8c576883ec
parentfda1614e1e95e7ecdfa97ea0afb80597ef8dbbc7
pvgrub: ignore NUL

When using pvgrub in graphical mode with vnc, the grub timeout doesn't
work: the countdown doesn't even start. With a serial terminal the
problem doesn't occur and the countdown works as expected.

It turns out that the problem is that when using a graphical terminal,
checkkey () returns 0 instead of -1 when there is no activity on the
mouse or keyboard. As a consequence grub thinks that the user typed
something and interrupts the count down.

To fix the issue simply ignore keystrokes returning 0, that is the NUL
character anyway. Add a patch to grub.patches to do that.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Steven Haigh <netwiz@crc.id.au>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
stubdom/grub.patches/11graphics-keyboard.diff [new file with mode: 0644]